home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 April / EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso / EARCD / comm / ambos / AmBoS_V2_74.lha / AmBoS_Install / AmBoS / Programmer / Source / BBS_Lib / Beispiel.c < prev    next >
C/C++ Source or Header  |  1995-10-14  |  731b  |  40 lines

  1. /*
  2. **  Beispielprogramm zur Benutzung der BBS.library
  3. */
  4.  
  5. #include <libraries/BBS_library.h>
  6. #include <pragmas/BBS_pragmas.h>
  7.  
  8. //#include <clib/BBS_protos.h>
  9.  
  10. struct Library    *BBSBase;
  11. struct ExternInfo *ExternInfo;
  12.  
  13. int main(int argc, char *argv[])
  14.  
  15. {
  16.     
  17.     if((BBSBase = (struct Library *)OpenLibrary((char *)"BBS.library", 2L)) == 0)
  18.       return(0);
  19.  
  20.     // Verbindung zur Box herstellen
  21.     
  22.     if (!(ExternInfo = (struct ExternInfo *)bbs_open(argv[1])))
  23.     {
  24.         CloseLibrary(BBSBase);
  25.         return(0);
  26.     }
  27.  
  28.     // String ausgeben
  29.  
  30.     bbs_printf ("Hallo %s aus %s !\r\n\r\n",ExternInfo->UserName,ExternInfo->City);
  31.  
  32.     // Port wieder freigeben
  33.  
  34.     bbs_close();
  35.     CloseLibrary(BBSBase);
  36.     return(0);
  37. }
  38.  
  39.  
  40.